﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using laba2.Entity;

namespace laba2.Configurations
{
    public class StudentConfiguration : EntityTypeConfiguration<Student>
    {
        public StudentConfiguration()
        {
            Property(s => s.Name).IsRequired().HasMaxLength(30);
            Property(s => s.Phone).IsOptional().HasMaxLength(15);
            Property(s => s.Address).IsOptional().HasMaxLength(50);
            Property(s => s.Email).IsOptional().HasMaxLength(20);
        }
    }
}
